.TH E1432_SET_BLOCKSIZE 3 E1432
.SH NAME
.nf
e1432_set_blocksize \- Set measurement blocksize
e1432_get_blocksize \- Get current measurement blocksize
e1432_get_blocksize_current_max \- Get current maximum blocksize
.fi
.IX e1432_set_blocksize(3) 3
.IX e1432_get_blocksize(3) 3
.IX e1432_get_blocksize_current_max(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_blocksize(E1432ID hw, SHORTSIZ16 ID,
                               LONGSIZ32 blocksize)
SHORTSIZ16 e1432_get_blocksize(E1432ID hw, SHORTSIZ16 ID,
                               LONGSIZ32 *blocksize)
SHORTSIZ16 e1432_get_blocksize_current_max(E1432ID hw, SHORTSIZ16 ID,
                                           LONGSIZ32 *max)
.cE
.SH DESCRIPTION

\fIe1432_set_blocksize\fR sets the measurement blocksize, of a single
channel or group of channels \fIID\fR, to the value given in
\fIblocksize\fR.  If a measurement is in progress while calling this
function, the measurement is aborted.

\fIe1432_get_blocksize\fR returns the current value of the measurement
blocksize, of a single channel or group of channels \fIID\fR,
into a memory location pointed to by \fIblocksize\fR.

When the data port is set to VME (see \fIe1432_set_data_port\fR), then
this \fIblocksize\fR is the number of data samples produced, for each
active channel, each time there is a trigger.  These samples are put
together into a contiguous block, one block for each active channel,
and sent to the VME bus.

When the data port is set to local bus eavesdrop, (see
\fIe1432_set_data_port\fR), this \fIblocksize\fR is again the number
of data samples in a block sent to the VME bus.

The transfer size for local bus transfers (when the data port is
either local bus, or local bus eavesdrop) is specified by
\fIe1432_set_xfer_size\fR.  However, the default value for that is zero
which means to use this \fIblocksize\fR.

\fIe1432_get_blocksize_current_max\fR returns the maximum valid value
for the blocksize, given the amount of DRAM available, the current
number of active channels, and the current settings of the calc data,
data size, data port, append status, and fifo size parameters.  The
value is returned into the memory location pointed to by \fImax\fR.
If the \fIID\fR is a group ID, then
\fIe1432_get_blocksize_current_max\fR returns the minimum of the
maximum blocksizes of the modules in the group.

This same "current maximum blocksize" can also be used to determine
the current maximum value for the overlap.

To get the maximum value for fifo size, use
\fIe1432_get_fifo_size_current_max\fR.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIblocksize\fR selects the number of sample points in a block.  The
minimum legal value is 1; the maximum depends on how much RAM is
available, how many channels are active in a module, and whether the 
module is doing FFTs or is in zoom mode.  When the module is doing FFTs, the
following restrictions on blocksize hold:

        Minimum:  64 non-zoom   32 zoom 
        Maximum:  8192 non-zoom 4096 zoom
        Must be a power of two	

The blocksize parameter should not include the size of the appended status 
data, as defined in \fIe1432_set_append_status\fR.  This parameter may also be
set with \fIe1432_set_data_format\fR.

\fBNOTE:\fR  When doing an order track measurement, the following relationship
must hold between these parameters:

	max_order <= blocksize * delta_order / 5.12

or an \fBERR1432_ILLEGAL_BLOCK_ORDER_COMBO\fR error will be issued when the
measurement starts.

When the data size is set to \fBE1432_DATA_SIZE_16\fR, which is the
default, the \fIblocksize\fR will be rounded down to an even number
(but a \fIblocksize\fR of one will get rounded up to two to avoid
getting a zero blocksize).

When doing local-bus transfers, the minimum blocksize is four.

.SH "RESET VALUE"
After a reset, the measurement \fIblocksize\fR is set to \fB1024\fR (1K).
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_append_status, e1432_set_calc_data, e1432_set_data_format,
e1432_set_data_port, e1432_set_data_size, e1432_set_delta_order, 
e1432_set_max_order, e1432_set_overlap, e1432_set_xfer_size, 
e1432_get_blocksize_limits, e1432_get_fifo_size_current_max
.ad
